/**
 * Copyright (c) 2006-2013 Las Venturas Mineground
 *
 * This program is free software: you can redistribute it and/or modify it under the terms of the
 * GNU General Public License as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program.
 * If not, see <http://www.gnu.org/licenses/>.
 */

package org.mineground.commands;

import org.bukkit.command.Command;

/**
 * The command dispatcher is where Mineground keeps track of the available commands, regardless what
 * kind of commands (player, console or IRC). Commands 
 */
public class CommandDispatcher {
    /**
     * Iterates over all methods declared in the given class to find ones which are annotated with
     * the @Command annotation. We then create a reference based on the given settings, and store
     * and found commands in the command map.
     * 
     * @param command The command which should be registered with the dispatcher.
     */
    public static void RegisterCommands(CommandRegistrar registrar) {
        // TODO: Implement this method.
    }
    
    /**
     * Invoked when a command has been issued by either a player, an administrator on the console or
     * someone on IRC. We'll try to match the command's name against a registered command, and then
     * verify that it wants to receive commands with the type this origin represents.
     * 
     * @param sender Object describing who sent the command, either a Player or the console.
     * @param command The command which has been executed by this sender.
     * @param label The command as it has been typed, independent of labels.
     * @param arguments Arguments as they have been passed to the command, space separated.
     * @return A boolean indicating whether we were able to handle the command.
     */
    public static boolean Dispatch(CommandOrigin sender, Command command, String label, String[] arguments) {
        // TODO: Implement this method.
        return false;
    }
}
